package com.fr.base;

import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;

public abstract class XMLFileManager
  implements XMLReadable, XMLWriter
{
  public abstract String fileName();

  public boolean readXMLFile()
  {
    InputStream localInputStream = FRContext.getResourceStream(fileName());
    if (localInputStream != null)
    {
      try
      {
        XMLTools.readInputStreamXML(this, localInputStream);
      }
      catch (Exception localException)
      {
        FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
        int i = 0;
        return i;
      }
      finally
      {
        try
        {
          localInputStream.close();
        }
        catch (IOException localIOException3)
        {
          localIOException3.printStackTrace();
        }
      }
      return true;
    }
    return false;
  }
}